<template>
  <el-dialog :visible.sync="kc24Dialog" :close-on-click-modal="false" :before-close="detailCancel" :fullscreen="kc24Dialog" @close="detailCancel">
    <div class="app-container">
      <!--工具栏-->
      <div class="head-container">
        <div>
          <!--工具栏-->
        </div>
        <!--表格渲染-->
        <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
          <el-table-column type="selection" width="55" />
          <el-table-column prop="aac001" label="个人编号" align="center" width="75px" />
          <el-table-column prop="aac003" label="姓名" align="center" width="70px" />
          <el-table-column prop="akc021" label="医疗人员类别" align="center" width="100px" />
          <el-table-column prop="akb020" label="服务机构编号" align="center" width="100px" />
          <el-table-column prop="akb021" label="服务机构名称" align="center" width="300px" />
          <el-table-column prop="aae036" label="结算时间" align="center" width="140px" />
          <el-table-column prop="akc264" label="医疗费总额" align="center" width="90px" />
          <el-table-column prop="akc261" label="个人现金支付" align="center" width="100px" />
          <el-table-column prop="akc255" label="帐户支付金额" align="center" width="100px" />
          <el-table-column prop="akc260" label="统筹支付金额" align="center" width="100px" />
          <el-table-column prop="akc190" label="住院编码" align="center" width="140px" />
        </el-table>
        <!--分页组件-->
        <pagination />
      </div>
    </div>
  </el-dialog>
</template>

<script>
import crudPggs from '@/api/business/pggs'
import CRUD, { presenter, header, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import moment from 'moment'
import { mapGetters } from 'vuex'

export default {
  name: 'Kc22',
  components: { pagination, crudOperation, rrOperation, udOperation },
  mixins: [presenter(), header(), crud()],
  dicts: ['ccstcqh'],
  cruds() {
    return CRUD({ title: '费用明细', url: 'api/generalQuery/queryKc24', idField: 'id', sort: 'aae036,asc', crudMethod: { ...crudPggs }})
  },
  data() {
    return {
      value2: '',
      roleId: 0,
      akc190: '',
      kc24Dialog: false,
      cblxTypeOptions: [
        { key: '职工', display_name: '职工' },
        { key: '居民', display_name: '居民' }
      ],
      zhlbTypeOptions: [
        { key: '9', display_name: '机构' },
        { key: '10', display_name: '居家' }
      ],
      permission: {
        add: ['admin', 'pggs:add'],
        edit: ['admin', 'pggs:edit'],
        del: ['admin', 'pggs:del']
      },
      rules: {
        bisGsglQymc: [
          { required: true, message: '企业名称不能为空', trigger: 'blur' }
        ],
        bisGsglTyshxydm: [
          { required: true, message: '统一社会信用代码不能为空', trigger: 'blur' }
        ],
        bisGsglLxr: [
          { required: true, message: '联系人不能为空', trigger: 'blur' }
        ],
        bisGsglLxrdh: [
          { required: true, message: '联系人电话不能为空', trigger: 'blur' }
        ],
        bisGsglSsqx: [
          { required: true, message: '所属区县不能为空', trigger: 'blur' }
        ],
        bisGsglZcdz: [
          { required: true, message: '注册地址不能为空', trigger: 'blur' }
        ]
      },
      queryTypeOptions: [
        { key: 'bisGsglQymc', display_name: '企业名称' },
        { key: 'bisGsglTyshxydm', display_name: '统一社会信用代码' },
        { key: 'bisGsglLxr', display_name: '联系人' },
        { key: 'bisGsglLxrdh', display_name: '联系人电话' },
        { key: 'bisGsglSsqx', display_name: '所属区县' },
        { key: 'bisGsglZcdz', display_name: '注册地址' }
      ]
    }
  },
  computed: {
    ...mapGetters([
      'user'
    ])
  },
  methods: {
    // 钩子：在获取表格数据之前执行，false 则代表不获取数据
    [CRUD.HOOK.beforeRefresh]() {
      this.query.akc190 = this.akc190
      return this.kc24Dialog
    },
    detailCancel() {
      this.kc24Dialog = false
    },
    linstensing(d) {
      // query.aae002
      const date1 = moment(d).format('YYYYMM')
      this.query.aae002 = date1
      return date1
    }
  }
}
</script>

<style scoped>

</style>
